package com.twu.biblioteca.movie;


public class Movie {
    public static final String NO_RATING = "N/A";
    private String name;
    private int year;
    private String director;
    private int rating = 0;


    public Movie(String name, int year, String director) {
        this.name = name;
        this.year = year;
        this.director = director;
    }

    public Movie(String name, int year, String director, int rating) {
        this.name = name;
        this.year = year;
        this.director = director;
        this.rating = rating;
    }

    public String getName() {
        return name;
    }

    public int getYear() {
        return year;
    }

    public String getDirector() {
        return director;
    }

    public String getOutPutRating() {
        if(0!=rating){
            return String.valueOf(rating);
        }
        return NO_RATING;
    }

    @Override
    public String toString(){
        return getName() + "\t" + getYear() + "\t" + getDirector() + "\t" + getOutPutRating();
    }

}
